package java_test.polymorphism.abstract_test;

public class Employee1 {
    private String name;
    private String address;
    private int number;

    public Employee1(String name, String address, int number) {
        System.out.println("员工的基础构造函数");
        this.address = address;
        this.name = name;
        this.number = number;
        System.out.println(toString());
    }

    public void mailCheck() {
        System.out.println("邮票寄给：" + this.name);
        System.out.println("邮票寄去地址：" + this.address);
    }

    @Override
    public String toString() {
        return "Employee1{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", number=" + number +
                '}';
    }

    public String getName() {
        return name;
    }

    public String getAddress() {
        return address;
    }

    public int getNumber() {
        return number;
    }

    public void setAddress(String newAddress) {
        this.address = newAddress;
    }
}
